import request from '@/utils/request'

// 查询合同成本列表
export function listCost(query) {
  return request({
    url: '/business/cost/list',
    method: 'get',
    params: query
  })
}

// 查询合同成本列表
export function listContractCost(query) {
  return request({
    url: '/business/cost/listContractCost',
    method: 'get',
    params: query
  })
}

// 查询合同成本详细
export function getCost(costId) {
  return request({
    url: '/business/cost/' + costId,
    method: 'get'
  })
}

// 新增合同成本
export function addCost(data) {
  return request({
    url: '/business/cost',
    method: 'post',
    data: data
  })
}

// 修改合同成本
export function updateCost(data) {
  return request({
    url: '/business/cost',
    method: 'put',
    data: data
  })
}

// 删除合同成本
export function delCost(costId) {
  return request({
    url: '/business/cost/' + costId,
    method: 'delete'
  })
}

// 导出合同成本
export function exportCost(query) {
  return request({
    url: '/business/cost/export',
    method: 'get',
    params: query
  })
}

// 导出合同成本
export function exportCostAll(query) {
  return request({
    url: '/business/cost/exportAll',
    method: 'get',
    params: query
  })
}